#ifndef __Mesh_h
#define __Mesh_h

#include "vector.h"

/*----------------------------------------------------------*/

class Mesh
{
protected:
  Vector _nodes;
  void _init(double d1, double d2);

public:
  ~Mesh() {}
  Mesh(size_t n);
  Mesh(size_t n, double d1, double d2);
  int ncells() const
  {
    return _nodes.size()-1;
  }
  int nnodes() const
  {
    return _nodes.size();
  }
  double node(int inode) const
  {
    return _nodes[inode];
  }
  void nodesOfCell(double& x1, double& x2, int icell) const
  {
    x1 = _nodes[icell];
    x2 = _nodes[icell+1];
  }
};

#endif
